﻿import request from '@/utils/request'

export function getListPaged(params) {
  return request({
    baseURL: process.env.VUE_APP_API,
    url: '/api/SparePartStorage/clients',
    method: 'get',
    params
  })
}

export function get(id) {
  return request({
    baseURL: process.env.VUE_APP_API,
    url: `/api/SparePartStorage/clients/${id}`,
    method: 'get'
  })
}

export function create(data) {
  return request({
    baseURL: process.env.VUE_APP_API,
    url: `/api/SparePartStorage/clients`,
    method: 'post',
    data
  })
}

export function update(id, data) {
  return request({
    baseURL: process.env.VUE_APP_API,
    url: `/api/SparePartStorage/clients/${id}`,
    method: 'put',
    data
  })
}

export function remove(id) {
  return request({
    baseURL: process.env.VUE_APP_API,
    url: `/api/SparePartStorage/clients?id=${id}`,
    method: 'delete'
  })
}
